package day03;

import java.util.Scanner;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/10
 */
/*练习1：打印出n行金字塔，字母版
         *
        ***
       *****
      *******
         A
        BBB
       CCCCC
      DDDDDDD*/
public class CycleDemo1 {
    /*    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入行数：");
            int n = sc.nextInt();
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n-i; j++) {
                    System.out.print(" ");
                }
                for (int s=1; s<=2*i-1; s++) {
                    System.out.print("*");
                }
                System.out.println();
            }
        }*/
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入行数：");
        int n = sc.nextInt();
        char l='A';
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n - i; j++) {
                System.out.print(" ");
            }
            for (int c = 1; c <= 2*i-1; c++) {
                    System.out.print((char)(l+i-1));
            }
                System.out.println();
            }
        }
    }



